#include "Square.h"
#include "Vector3D.h"

e3d::Square::Square(	const e3d::Vector3Df& upLeft, const e3d::Vector3Df& upRight, 
						const e3d::Vector3Df& lowLeft, const e3d::Vector3Df& lowRight )
						:	m_upLeft( upLeft ),
							m_upRight( upRight ),
							m_lowLeft( lowLeft ),
							m_lowRight( lowRight ),
							m_center( upLeft.squareMiddle( upRight, lowLeft, lowRight ) )
{}

e3d::Square::Square(	const e3d::Vector3Df& upLeft, const e3d::Vector3Df& upRight, 
						const e3d::Vector3Df& lowLeft, const e3d::Vector3Df& lowRight, 
						int upLeftIndex, int upRightIndex, int lowLeftIndex, int lowRightIndex )
						:	m_upLeft( upLeft ),
							m_upRight( upRight ),
							m_lowLeft( lowLeft ),
							m_lowRight( lowRight ),
							m_center( upLeft.squareMiddle( upRight, lowLeft, lowRight ) ),
							m_upLeftIndex( upLeftIndex ),
							m_upRightIndex( upRightIndex ),
							m_lowLeftIndex( lowLeftIndex ),
							m_lowRightIndex( lowRightIndex )
{}